package Zuoye;

import java.util.Scanner;

public class Zuoye1 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        int sum,max,min;
        double avg;
        sum=max=min=0;
        avg=0.0;
        for (int i = 1; i <= 3; i++) {
            System.out.println("---------"+i+"班---------");
            for (int j = 1; j <= 5; j++) {
                System.out.print("\t第"+j+"个学生成绩：");
                int score=input.nextInt();
                if(i == 1){
                    min = score;
                }
                if(score > max){
                    max = score;
                }
                if(score < min){
                    min = score;
                }
                sum += score;
            }
            avg = sum / 5;
            System.out.println(i+"班的总分位："+sum+"\n平均分为："+avg+"\n最高分为："+max+"\n最低分为："+min);
        }
        //1、输入3个班，每班5个学生的成绩，求每个班的总分、平均分、最高分、最低分。
    }
}
